function checkAge(age) {
    if (age < 18) {
        const message = "Sorry, you're too young."; //? const和let的块级作用域 if的{}也是块级作用域
    } else {
        const message = "Yay! You're old enough!";
    }

    return message;  //? 访问不到块级作用域
}

console.log(checkAge(21));
